package com.google.devrel.example.android.protips;

import com.google.devrel.example.android.protips.mvp.view.MainPhoneActivityView;
import com.google.devrel.example.android.protips.mvp.view.MainTabletActivityView;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

public class LaunchActivity extends Activity {

	private static boolean tabletSupport = 
		android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.HONEYCOMB;

	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		Intent startActivityIntent = null;
		
		if (tabletSupport) {
			startActivityIntent = new Intent(this, MainTabletActivityView.class);
		} else {
			startActivityIntent = new Intent(this, MainPhoneActivityView.class);
		}
		
		startActivity(startActivityIntent);
		finish();
	}
}